|
Header: |
Files.h |
|
Carbon status: |
Supported |
Retrieves the user comments for a file or directory. This function runs asynchronously.
OSErr PBDTGetCommentAsync (
DTPBPtr paramBlock
);
-
paramBlock
-
A pointer to a desktop parameter block.
-
-
function result
-
A result code.
DISCUSSION
Clear all fields (other than input fields) in the parameter block that you pass to Desktop Manager functions. The relevant fields of the parameter block for this function are:
- ioCompletionOn input, a universal procedure pointer to a completion function. A value of type IOCompletionUPP.
- ioResultOn return, the result code of the function. A value of type OSErr.
- ioNamePtrOn input, a pointer to a file or directory name for which you want to retrive comments. A value of type StringPtr.
- ioDTRefNumOn input, the desktop database reference number of the database in which the specified file or directory is found. A value of type SInt16.
- ioDTBufferOn input, a pointer to a buffer for the comment text. On return, a pointer to the coment text. You allocate a buffer big enough to hold the largest comment, 200 bytes. The PBDTGetComment function places the comment in the buffer as a plain text string and places the length of the comment in ioDTActCount. A value of type Ptr.
- ioDTActCountOn return, the comment size. A value of type SInt32.
- ioDirIDOn input, the parent directory of the file or directory for which you wish to retrieve comments. A value of type SInt32.
SPECIAL CONSIDERATIONS
All of the Desktop Manager functions may move or purge memory blocks in the application heap or for some other reason should not be called from within an interrupt. Your application should not call Desktop Manager functions at interrupt time.
AVAILABILITY
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)